package com.itheima.dao;

import com.itheima.domain.Traveller;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
* 旅客
* */
public interface TravellerDao {

    /*
    * 旅客和订单之间的多对多查询
    * */
    @Select("select * from traveller where id in (" +
                "select travellerId from order_traveller where orderId = #{id} " +
            ")")
    List<Traveller> findById(String id);
}
